package srzy.data

//extends Bean
class CaseInfo {
  var caseName: String = ""
  var casePath: String = ""
  var caseDesc: String = ""
  var caseType: String = ""
  var initShell: String = ""
  var input: List[String] = List[String]()
  var normalCdr: CdrInfo = new CdrInfo()
  var errCdr: CdrInfo = new CdrInfo()
  var transCdr: CdrInfo = new CdrInfo()
  var dbCompareInfo: List[DBCompareInfo] = List[DBCompareInfo]()
  //  var dbCompareInfo: Map[Int, DBCompareInfo] = Map[Int, DBCompareInfo]()

  var cdrCompResult: Boolean = true
  var dbCompareResult: Boolean = true
  var caseResult: Boolean = true

  override def toString(): String = {
    var s = ""
    if (normalCdr.stdFull.length + normalCdr.stdCutted.length +
      normalCdr.realFull.length + normalCdr.realCutted.length > 0) {
      s += "normalCdr:" + "\n" + normalCdr + "\n"
    }
    if (errCdr.stdFull.length + errCdr.stdCutted.length +
      errCdr.realFull.length + errCdr.realCutted.length > 0) {
      s += "errCdr:" + "\n" + errCdr + "\n"
    }
    if (transCdr.stdFull.length + transCdr.stdCutted.length +
      transCdr.realFull.length + transCdr.realCutted.length > 0) {
      s += "transCdr:" + "\n" + transCdr + "\n"
    }

    "caseName:" + caseName + "\n" +
      "caseDesc:" + caseDesc + "\n" +
      "caseType:" + caseType + "\n" +
      //    "initShell:" + initShell + "\n" +
      "input:" + input + "\n" + s +
      "dbCompareInfo:" + dbCompareInfo + "\n" +
      "cdrCompResult:" + cdrCompResult + "\n" +
      "dbCompareResult:" + dbCompareResult + "\n" +
      "caseResult:" + caseResult + "\n"
  }
}